package com.dt76.smallloanfrontenduser.remote.etao;


import com.dt76.smallloanfrontenduser.hystrix.etao.UserHystrix;
import com.dt76.smallloanfrontenduser.pojo.etao.User;
import com.dt76.smallloanfrontenduser.utils.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "smallloan-Frontend-Service", fallback = UserHystrix.class)
public interface UserRemote {

    @RequestMapping("/doLogin")
    Result doLogin(@RequestParam("userName") String userName,
                   @RequestParam("password") String password);


    @RequestMapping("/insertUser")
    Result insertUser(@RequestBody User user);

    @RequestMapping("/doLoginByEmail")
    Result doLoginByEmail(@RequestParam("email") String email);
}
